<!DOCTYPE html>
<html>

{include file='public/header'}

<body>
    <div class="x-nav">
        <span class="layui-breadcrumb">
            <a href="javascript:void(0)">首页</a>
            <a href="javascript:void(0)">版权合作</a>
            <a><cite>输入版权结算统计</cite></a>
        </span>
        <a class="layui-btn layui-btn-small" id="reload" title="刷新">
            <i class="layui-icon" style="line-height:30px"><i class="iconfont">&#xe6aa;</i></i>
        </a>
    </div>
    <div class="x-body">
        <div class="layui-row">
            <form class="layui-form">
                <div class="layui-inline">
                    <label class="layui-form-label w-auto">版权方名称：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="name" placeholder="请输入版权方名称" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label w-auto">时间：</label>
                    <div class="layui-inline" id="time" style="display: flex;
                    ">
                        <div class="layui-input-inline" style="margin-right:10px">
                            <input type="text" autocomplete="off" name="start_date" id="start_date" class="layui-input"
                                placeholder="开始日期">
                        </div>
                        <div class="layui-form-mid">-</div>
                        <div class="layui-input-inline">
                            <input type="text" autocomplete="off" name="end_date" id="end_date" class="layui-input"
                                placeholder="结束日期">
                        </div>
                    </div>
                </div>
                <button class="layui-btn" style="margin-left: 10px;" lay-submit lay-filter="searchList">搜索</button>
                <button type="reset" id="resetList" class="layui-btn layui-btn-primary">重置</button>
            </form>
        </div>
        <table id="partners" lay-filter="partners"></table>
    </div>
    <script>
        let params = {
            elem: '#partners'
            , toolbar: '#toolbarDemo'
            , url: '/admin/partners/enterSettlement' //数据接口
            , id: 'partners'
            ,page:true
            , cols: [[ //表头
                { field: 'id', title: 'ID', width: 80, sort: true,align:'center' }
                , { field: 'name', title: '版权方简称',align:'center' }
                , { field: 'date', title: '时间日期',align:'center'}
                , { field: 'monetary', title: '消费金额',align:'center'}
                , { field: 'divided_amount', title: '分成金额',align:'center'}
            ]]
        }
        tableList(params)

        layui.use('laydate', function () {
            var laydate = layui.laydate;
            //日期范围
            laydate.render({
                elem: '#time'
                , range: ['#start_date', '#end_date']
                ,format: 'yyyy-MM-dd'
            });
        })
    </script>
</body>

</html>